package manage.modules.worker.service;

import java.util.List;
import java.util.Map;

import manage.commons.utils.Pager;
import manage.modules.dept.model.Dept;
import manage.modules.group.model.Group;
import manage.modules.group.model.WorkerOfGroup;
import manage.modules.role.model.Role;
import manage.modules.worker.model.Worker;
import manage.modules.worker.model.WorkerInfo;

public interface WorkerService {
	Worker select(Long workerId);

	int insert(Worker worker);

	int update(Worker worker);

	int delete(Long workerId);

	List<Worker> listAll();

	boolean exists(Long workerId);

	Long getCountOfAll();

	void query(Map<String, String> param, Pager<Worker> pager);

	List<Group> listWorkerOfGroup(Long workerId);

	List<Role> listWorkerOfRole(Long workerId);

	List<Dept> listWorkerOfDept(Long workerId);

	List<Worker> listWorkerByDeptId(Long deptId);

	List<Worker> listWorkerByGroupId(Long groupId);

	int insertWorkerOfGroup(WorkerOfGroup workerOfGroup);

	void insertWorkerOfGroups(Long workerId, List<Long> groupIds);

	int deleteWorkerOfGroup(WorkerOfGroup workerOfGroup);

	void deleteWorkerOfGroups(Long workerId, List<Long> groupIds);

	List<Long> listGroupIdByWorkerId(Long workerId);

	Map<String, Object> getWorkerOrganization(WorkerInfo worker, Integer[] ability);

	WorkerInfo selectWorkerInfo(Long workerId);
}
